<?php $this->load->view('admin/_begin') ?>
<script type="text/javascript">
  $(document).ready(function(){
    $('#shortcuts').hide();
  });
</script>
<form action="<?php echo site_url('admin/permission/save') ?>" method="post">
  <table>
    <?php if (empty($objs)) { ?>
      <tr class="alt-row"><td><?php echo $this->lang->line('admin.permission.data.empty') ?></td></tr>
    <?php } else { ?>
      <thead>
        <tr>
          <th><?php echo $this->lang->line('admin.permission.field.group') ?></th>
          <th><?php echo $this->lang->line('admin.permission.field.access') ?></th>
          <th><?php echo $this->lang->line('admin.permission.field.deny') ?></th>
        </tr>
      </thead>
      <tfoot>
        <tr>
          <td colspan="3">
            <div class="bulk-actions align-left">
              <input class="button" type="submit" value="<?php echo $this->lang->line('admin.permission.btn.submit') ?>" />
            </div>                  
            <div class="clear"></div>
          </td>
        </tr>
      </tfoot>
      <tbody>
        <?php foreach ($objs as $id => $obj) { ?>
          <tr>
            <td><?php echo $obj['name'] ?></td>
            <td>
              <textarea name="group[<?php echo $id ?>][access]"><?php echo $obj['access'] ?></textarea>
            </td>
            <td>
              <textarea name="group[<?php echo $id ?>][deny]"><?php echo $obj['deny'] ?></textarea>
            </td>
          </tr>
        <?php } ?>
      </tbody>
    <?php } ?>
  </table>
</form>
<?php $this->load->view('admin/_end') ?>